﻿
using System;
using System.Collections.Generic;
using System.Linq;
using WPTrek.Data.Players;
using WPTrek.Data.Space;
namespace WPTrek.Data
{
    public class Universe : IUniverse
    {
        public Universe(IGalaxyFactory galaxyFactory, IPlayerFactory playerFactory)
        {
            if (galaxyFactory == null)
                throw new NullReferenceException("Illegal null-reference galaxy factory");

            Galaxies = galaxyFactory.Create().ToList();
            Player = playerFactory.Create();
        }

        #region IUniverse Members

        public IEnumerable<IGalaxy> Galaxies { get; private set; }

        public IPlayer Player { get; private set; }

        #endregion
    }
}
